package com.zy.design.ocp.ns;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhaoyi
 * @date 2021/3/15 17:47
 */
public class Alert2 {

    private List<AlertHandler> alertHandlers = new ArrayList<>();

    public void addAlertHandler(AlertHandler alertHandler) {
        alertHandlers.add(alertHandler);
    }


    public void check(ApiStatInfo apiStatInfo) {
        for (AlertHandler handler : alertHandlers) {
            handler.check(apiStatInfo);
        }
    }

}
